]> git.r.bdr.sh - rbdr/map/blame_incremental - Map/Presentation/Base Components/EvolutionPicker.swift
Address the lint warnings
[rbdr/map] / Map / Presentation / Base Components / EvolutionPicker.swift
... / ...
CommitLineData
1// Copyright (C) 2024 Rubén Beltrán del Río
2
3// This program is free software: you can redistribute it and/or modify
4// it under the terms of the GNU General Public License as published by
5// the Free Software Foundation, either version 3 of the License, or
6// (at your option) any later version.
7
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12
13// You should have received a copy of the GNU General Public License
14// along with this program. If not, see https://map.tranquil.systems.
15import SwiftUI
16
17struct EvolutionPicker: View {
18
19 @Binding var selectedEvolution: StageType
20
21 var body: some View {
22 Picker("Evolution", selection: $selectedEvolution) {
23 ForEach(StageType.types) { stage in
24 Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0)
25 }
26 Divider()
27 ForEach(StageType.characteristics) { stage in
28 Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0).font(.Theme.body)
29 }
30 Divider()
31 ForEach(StageType.properties) { stage in
32 Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0)
33 }
34 Divider()
35 ForEach(StageType.custom) { stage in
36 Text(Stage.title(stage)).font(.Theme.body).tag(stage).padding(4.0)
37 }
38 }.font(.Theme.body).padding(.horizontal, 8.0).padding(.vertical, 4.0)
39 }
40}
41
42#Preview {
43 let selectedEvolution: StageType = .behavior
44 EvolutionPicker(selectedEvolution: .constant(selectedEvolution))
45}